Method and device for controlling a robot

ABSTRACT

A method for controlling a robot is described. The method includes acquiring sensor data representing an environment of the robot, identifying one or more objects in the environment of the robot from the sensor data, associating the robot and each of the one or more objects with a respective agent of a multiagent system, determining, for each agent of the multiagent system, a quality measure which includes a reward term for a movement action at a position and a coupling term which depends on the probabilities of the other agents occupying the same position as the agent at a time, determining a movement policy of the robot that selects movement actions with a higher value of the quality measure determined for the robot with higher probability than movement actions with a lower value of the quality measure, and controlling the robot according to the movement policy.

CROSS REFERENCE

The present application claims the benefit under 35 U.S.C. § 119 of European Patent Application No. EP 20157410.0 filed on Feb. 14, 2020, which is expressly incorporated herein by reference in its entirety.

FIELD

The present disclosure relates to devices and methods for controlling a robot.

BACKGROUND INFORMATION

Multi-agent learning is a challenging problem in machine learning that has applications in different domains such as distributed control, robotics (including autonomous driving), and economics. In many multiagent systems, agents do not necessary select their optimum strategies against other agents. For example, autonomous vehicles will not abruptly replace human-controlled vehicles and will not be isolated from human-controlled traffic on separate routes. Therefore, the autonomous vehicles will have to move safely in mixed traffic with other objects controlled by humans, whereby these external objects also include pedestrians as weaker road users. In the case of human-controlled external objects, there is uncertainty as to which movement action these other objects will perform next.

German Patent Application No. DE 10 2018 210 280 A1 describes a method for trajectory planning for an autonomous vehicle in particular in mixed traffic with human controlled other objects. In that method, a Q-function is established for each other object and optimal movement policies are determined for the autonomous vehicle and the other objects by maximizing the Q-functions. From the optimal movement policies, trajectories for the other objects as well as a trajectory for the autonomous vehicle are determined.

However, this method has exponential runtime and memory requirements. The memory requirement of the method is T×A×P×S^(P), where S is the number of states, P is the number of players, A denotes the number of actions and T is the time horizon (the number of timesteps). Thus, the method may be applied to small state and action spaces with small number of players but the computation time for a multiagent game of 20 states and 4 players and 5 timesteps can easily exceed a computation time of three days.

Accordingly, more efficient approaches for determination of trajectories in a multi-agent scenario are desirable.

SUMMARY

In accordance with example embodiments of the present invention, the method for controlling a robot and the robot controller with the features corresponding to the first example and seventh example described below may provide a more efficient approach for trajectory planning than the approach described above. Since the interactions among the agents are modelled only through a coupling term which includes an occupancy measure, the computational complexity and memory can be reduced. In particular, exponential memory and runtime requirements arising from modelling each agent's behaviour as a Q-function over the product space of the states of all agents can be avoided. For example, for a multiagent game of 20 states and 4 players and 5 timesteps the computation time may be reduced to 1 second and thus make the approach usable in practice.

In the following, exemplary embodiments of the present invention are given.

Example 1 is a method for controlling a robot comprising acquiring sensor data representing an environment of the robot, identifying one or more objects in the environment of the robot from the sensor data, associating the robot and each of the one or more objects with a respective agent of a multiagent system, determining, for each agent of the multiagent system, a quality measure which includes a reward term for a movement action at a position and a coupling term which depends on the probabilities of the other agents occupying the same position as the agent at a time, determining a movement policy of the robot that selects movement actions with a higher value of the quality measure determined for the robot with higher probability than movement actions with a lower value of the quality measure and controlling the robot according to the movement policy.

Example 2 is the method according to Example 1, wherein the coupling term is a functional of occupancy measures of the other agents, wherein, for each agent, the occupancy measure for a position and a time denotes the likelihood of the agent being in the position at the time.

The coupling of the quality measures of the various agents via occupancy measures allows efficiently solving a multiagent reinforcement learning problem and deriving a control policy for the robot.

Example 3 is the method according to Example 1 or 2, wherein determining the quality measures comprises iteratively determining the quality measures in a plurality of iterations, wherein each iteration includes a forward pass from an initial time to an end time over a plurality of time steps and a backward pass from the end time to the initial time over the plurality of time steps.

The iterative approach comprising a forward pass and a backward pass allows resolving the interdependencies of the system of quality measures for the set of agents in an efficient manner.

Example 4 is the method according to Example 3, wherein the coupling term is a functional of occupancy measures of the other agents and the forward pass includes updating, for each agent, the occupancy measure of the next time step by propagating the occupancy measure of the current time step of an agent using the policy of the agent at the current time step.

This allows updating the occupancy measures in an iteration.

Example 5 is the method according to Example 3 or 4, wherein the coupling term is a functional of occupancy measures of the other agents and the backward pass includes updating, for each agent, the quality measure and policy of the agent at the current time step by using the occupancy measure of the other agents at the next time step.

This allows updating the quality measures in an iteration.

Example 6 is the method according to any one of Examples 1 to 5, wherein the movement policy is determined such that the actions for a system state of the multiagent system are distributed according to a Boltzmann distribution depending on the quality measure determined for the robot.

Determining a movement policy as a Boltzmann distribution gives a degree of freedom to deviate from the strictly optimal behaviour.

Example 7 is a robot controller configured to perform a method of any one of Examples 1 to Example 6.

Example 8 is a computer program comprising instructions which, when executed by a computer, makes the computer perform a method according to any one of Examples 1 to 6.

Example 9 is a computer-readable medium comprising instructions which, when executed by a computer, makes the computer perform a method according to any one of Examples 1 to 6.

In the figures, like reference characters generally refer to the same parts throughout the different views. The figures are not necessarily to scale, emphasis instead generally being placed upon illustrating the principles of the present invention. In the following description, various aspects are described with reference to the figures.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 shows an example for an autonomous driving scenario.

FIG. 2 shows a graphical model demonstrating the dependencies between variables in a multiagent reinforcement learning algorithm according to an example embodiment of the present invention with two agents.

FIG. 3 shows a flow diagram illustrating a method for controlling a robot according to an example embodiment of the present invention.

DETAILED DESCRIPTION OF EXAMPLE EMBODIMENTS

The following detailed description refers to the figures that show, by way of illustration, specific details and aspects of this disclosure in which the present invention may be practiced. Other aspects may be utilized and structural, logical, and electrical changes may be made without departing from the scope of the present invention. The various aspects of this disclosure are not necessarily mutually exclusive, as some aspects of this disclosure can be combined with one or more other aspects of this disclosure to form new aspects.

In the following, various examples will be described in more detail.

FIG. 1 shows an example for an autonomous driving scenario 100.

In the example of FIG. 1, a vehicle 101, for example a car, van or motorcycle is provided with a vehicle controller 102.

The vehicle controller 102 includes data processing components, e.g., a processor (e.g., a CPU (central processing unit)) 103 and a memory 104 for storing control software according to which the vehicle controller 102 operates and data on which the processor 103 operates.

For example, the stored control software includes instructions that, when executed by the processor 103, make the processor implement movement policy determiner 107.

The movement policy determiner 107 determines a movement policy for the vehicle 101 (and thus a (desired) trajectory for the vehicle 101) in order to avoid a collision with the other objects 108. The other objects 108 can be, in particular, people or vehicles controlled by people, such as conventional motor vehicles or bicycles. However, other objects that cannot be controlled or can only be controlled to a limited extent may also be present, such as a vehicle that rolls away after parking on a slope or a trailer that has broken away from its towing vehicle.

The vehicle controller 102 first identifies the other object 108. For this purpose, a time series of physical observations of the environment can be used, such as a sequence of camera images obtained by one or more cameras 105 and stored in memory 104 or a sequence of events output by an event-based sensor. Alternatively or in combination, information received via a wireless interface of the vehicle 101 can be used. This information can be transmitted by the other objects 108 themselves, for example via a Vehicle-to-Vehicle (V2V) interface. However, the information can also be transmitted by an infrastructure, for example via a Vehicle-to-Infrastructure (V2I) interface.

The movement policy determiner 107 may determine a movement policy (e.g., by determining trajectories of the other objects and a desired trajectory for the vehicle 101) and the vehicle controller 102 controls the vehicle 101 in accordance with the results of the determination. For example, the vehicle controller 102 may control an actuator 106 to control the vehicle's speed, e.g., to actuate the brakes of the vehicle, and direction of the vehicle 101.

According to various embodiments of the present invention, the movement policy determiner 107 models the vehicle 101 and the other objects by a non-cooperative multiagent system that models the interaction between the agents via their occupancy measure. This means that an agent selects its next action based on its benefit (individual reward) and the occupancy measure of the states (e.g., geographical positions). Occupancy measure represents the likelihood of the agents to be at a given state at a given time. It should be noted that the states of all agents at a certain time (time step) are considered to form a (overall) system state of the multiagent system.

According to various embodiments of the present invention, the model uses a set of Q-functions (which can be seen as Q-functions of a multiagent reinforcement learning problem) that are coupled through the occupancy measures (of each state for each agent and timestep). These Q-functions capture the behaviour of the agents at each time step and system state.

The movement policy determiner 107 models the behaviour of traffic participants using the multiagent system. More precisely, the movement policy determiner may use the resulting set of Q-functions to predict the future state of individual traffic participants. This helps controlling the self-driving vehicle without colliding with other traffic participants and create a smooth driving experience.

It should be noted that while embodiments are described for an autonomous driving scenario, the approaches described herein may also be used in other scenarios, e.g., predicting the positions of planes or ships. Similarly, the approaches described herein may not only be used to derive a control policy for an autonomous vehicle but any other robot or autonomous agent.

The term “robot” can be understood to refer to any physical system (with a mechanical part whose movement is controlled), such as a computer-controlled machine, a vehicle, a household appliance, a power tool, a manufacturing machine, a personal assistant or an access control system.

In general, approaches described herein may be used to solve any kind of multi agent game, e.g., in context of one of the application scenarios described above.

Modelling each agent's behaviour at timestep t as a Q-function over the product space of the states of all agents leads to exponential memory and runtime requirements.

According to various embodiments, instead, the Q-functions of each agent at each timestep are made independent of the exact position of the other agents. The individual Q-function of player i at system state x and timestep t only depends on the position of player i and its action and the occupancy measure (probability) of the other agents −i at state x given by

O _(j) ^(τ)(x _(i)):X→[0,1]

to denote the likelihood of agent j being at state x_(i) at time τ. More precisely, the Q-function for agent i is defined as

{tilde over (Q)} _(i) ^(τ)(x _(i) ,a _(i)):=R _(i)(x _(i) ,a _(i))+Ψ(O _(−i) ^(τ)(x _(i)))+

[{tilde over (V)} _(i) ^(τ+1)(x)|x _(i) ,a _(i)]

where O _(−i) ^(τ)(x _(i)):={O ₁ ^(τ)(x _(i)), . . . ,O _(M) ^(τ)(x _(i))}\{O _(i) ^(τ)(x _(i))}

where M is the number of agents (or players) and Ψ(·) is a functional. As an example, in the self-driving car scenario, a possible choice for Ψ(O_(−i) ^(τ)(x_(i))) is −Σ_(j∈−i)μ_(j)O_(j) ^(τ)(x_(i)) where μ_(j)>0.

The expectation is taken over the probabilistic state transitions and the value-function is defined as {tilde over (V)}_(i) ^(τ+1)(x):=

_({tilde over (π)}) _(i) _(τ+1) [{tilde over (Q)}_(i) ^(τ+1)(x;a)] and {tilde over (V)}_(i) ^(T)(x)=R_(i,F)(x) where R_(i,F)(x) denotes the final reward of agent i at state x.

The movement policy determiner 107 uses the Q-function of player i at system state x at time τ of action a to compute the policy which defines the probability of selection an action a in a given system state x and time τ.

These Q-functions are coupled using the occupancy probabilities of the agents. Obtaining the Q-functions of the agent imply their strategies (policies). Hence, finding these Q-functions is the goal in the approach for trajectory determination. The Q-functions are the solutions of a set of coupled equations. According to various embodiments, a forward-backward algorithm is used to solve this set of coupled equations. An example for this algorithm is given in the following in pseudo-code.

 1: {R_(j), R_(j,F)}, T, K  2: Initialize: {{tilde over (Q)}_(j) ⁰}, . . . , {{tilde over (Q)}_(j) ^(T)}  3: for j = 1, . . . , M do  4:  O_(j) ⁰ ← δ_(j), {tilde over (Q)}_(j) ^(T+1) ← R_(j,F)  5: end for  6: for k = 1, . . . , K do  7:  Forward-pass:  8:  for τ = 1, . . . , T and j = 1, . . . , M do  9:   O_(j) ^(τ) ← G_(j)(O_(j) ^(τ−1), {tilde over (Q)}_(j) ^(τ−1)) 10:  end for 11:  Backward-pass: 12:  for τ = T − 1, . . . , 0 and i = 1, . . . , M do 13:   {tilde over (Q)}_(i) ^(τ) ← B_(i)(O_(−i) ^(τ), {tilde over (Q)}_(i) ^(τ+1)) 14:  end for 15: end for

The algorithm starts off by an initial guess of the Q-functions, then in the forward pass, the occupancy measures are updated and in the backward pass, the Q-functions are updated.

More precisely, in the forward pass the occupancy measures of all players at all system states are propagated into the future timesteps τ using the Q-functions and the occupancy measures from time τ−1.

The action probability may be used to propagate the occupancy measures as follows

${{O_{i}^{\tau + 1}(x)} = {{\sum\limits_{x^{\prime},a}{{{\overset{\sim}{\pi}}_{i}^{\tau}\left( {a❘x^{\prime}} \right)}{P\left( {{x❘x^{\prime}},a} \right)}{O_{i}^{\tau}\left( x^{\prime} \right)}}} = {{{\mathbb{E}}_{{Exp}{\{{\overset{\sim}{Q}}_{i}^{\tau}\}}}\left\lbrack O_{i}^{\tau} \right\rbrack}:={G_{i}\left( {O_{i}^{\tau},{\overset{\sim}{Q}}_{i}^{\tau}} \right)}}}},\mspace{14mu}{{{for}\mspace{14mu} i} \in \lbrack M\rbrack},$

wherein [M]={1, . . . , M}.

The Q-function of player i at system state x at time T of action a may be used to compute the policy which defines the probability of selection an action a in a given state x and time τ:

π_(i)(a _(i) |{right arrow over (x)})∝exp(βQ _(i)({right arrow over (x)},a _(i))), for i∈[M]

This means that all agents select their mixed strategies such that actions with higher Q-functions are selected with higher probabilities (according to the Boltzmann distribution in this example.)

During the backward pass the Q-function of player i, Q_(i), is updated using the occupancy measures O_(−i), where −i denotes the opponents of agent i, and the already computed Q-functions from the future time steps, according to

${{\overset{\sim}{Q}}_{i}^{\tau} = {{R_{i} + {\Psi\left( O_{- i}^{\tau} \right)} + {{\mathbb{E}}_{{Exp}{\{{\overset{\sim}{Q}}_{i}^{\tau + 1}\}}}\left\lbrack {\overset{\sim}{Q}}_{i}^{\tau + 1} \right\rbrack}}:={B_{i}\left( {O_{- i}^{\tau},{\overset{\sim}{Q}}_{i}^{\tau + 1}} \right)}}},{{{for}\mspace{14mu} i} \in \lbrack M\rbrack},$

which describes the dependency between the Q-function and the occupancy measures.

The initial conditions of the algorithm are the occupancy measure at time 0 and the Q-functions at the final time step (corresponding to the given final reward).

It should be noted that it is assumed that agents are aware of each other's goals, i.e., reward functions {R_(j), R_(j,F)}_(j)∈[M] are known to all the agents.

It can be shown that under certain conditions, the above algorithm converges to a set of unique Q-functions as the number of iterations K tends to infinity.

FIG. 2 shows a graphical model 200 demonstrating the dependencies between variables in the above algorithm with two agents {i,j} and time horizon T=2. Here, k denotes the kth iteration of the algorithm {tilde over (Q)}_(i,k) ¹ denotes the Q-function of player i at time step 1 at the k-th iteration of the algorithm.

In summary, according to various embodiments of the present invention, a method is provided as illustrated in FIG. 3.

FIG. 3 shows a flow diagram 300 illustrating a method for controlling a robot according to an embodiment.

In 301, sensor data representing an environment of the robot are acquired.

In 302, one or more objects in the environment of the robot are identified from the sensor data are identified.

In 303, the robot and each of the one or more objects are associated with a respective agent of a multiagent system.

In 304, for each agent of the multiagent system, a quality measure is determined which includes a reward term for a movement action at a position and a coupling term which depends on the probabilities of the other agents occupying the same position as the agent at a time.

In 305, a movement policy of the robot is determined that selects movement actions with a higher value of the quality measure determined for the robot with higher probability than movement actions with a lower value of the quality measure.

In 306, the robot is controlled according to the movement policy.

According to various embodiments of the present invention, in other words, a movement policy of a robot is determined using multiagent reinforcement learning where the Q-function (i.e., quality measure) of agent i is factorized into two terms: the individual goal of the agent that depends only on (x_(i), a_(i)) and another term that encodes the interactions between i and its opponents (by means of occupancy measures).

The method of FIG. 3 may be performed by one or more computers including one or more data processing units. The term “data processing unit” can be understood as any type of entity that allows the processing of data or signals. For example, the data or signals may be treated according to at least one (i.e., one or more than one) specific function performed by the data processing unit. A data processing unit may include an analogue circuit, a digital circuit, a composite signal circuit, a logic circuit, a microprocessor, a micro controller, a central processing unit (CPU), a graphics processing unit (GPU), a digital signal processor (DSP), a programmable gate array (FPGA) integrated circuit or any combination thereof or be formed from it. Any other way of implementing the respective functions, which will be described in more detail below, may also be understood as data processing unit or logic circuitry. It will be understood that one or more of the method steps described in detail herein may be executed (e.g., implemented) by a data processing unit through one or more specific functions performed by the data processing unit.

Although specific embodiments have been illustrated and described herein, it will be appreciated by those of ordinary skill in the art that a variety of alternate and/or equivalent implementations may be substituted for the specific embodiments shown and described without departing from the scope of the present invention. This application is intended to cover any adaptations or variations of the specific embodiments discussed herein. 

What is claimed is:
 1. A method for controlling a robot, comprising: acquiring sensor data representing an environment of the robot; identifying one or more objects in the environment of the robot from the sensor data; associating the robot and each of the one or more objects with a respective agent of a multiagent system; determining, for each agent of the multiagent system, a quality measure which includes a reward term for a movement action at a position, and a coupling term which depends on probabilities of the other agents of the multiagent system occupying the same position as the respective agent at a time; determining a movement policy of the robot that selects movement actions with a higher value of the quality measure determined for the robot with higher probability than movement actions with a lower value of the quality measure; and controlling the robot according to the movement policy.
 2. The method according to claim 1, wherein the coupling term is a function of occupancy measures of the other agents, wherein, for each of the agents, the occupancy measure for a position and a time denotes a likelihood of the agent being in the position at the time.
 3. The method according to claim 2, wherein the determining of the quality measures includes iteratively determining the quality measures in a plurality of iterations, wherein each iteration includes a forward pass from an initial time to an end time over a plurality of time steps and a backward pass from the end time to the initial time over the plurality of time steps.
 4. The method according to claim 3, wherein the coupling term is a function of the occupancy measures of the other agents and the forward pass includes updating, for each agent, the occupancy measure of a next time step by propagating the occupancy measure of a current time step of an agent using the policy of the agent at the current time step.
 5. The method according to claim 3, wherein the coupling term is a function of the occupancy measures of the other agents and the backward pass includes updating, for each agent, the quality measure and policy of the agent at a current time step by using the occupancy measure of the other agents at a next time step.
 6. The method according to claim 1, wherein the movement policy is determined such that actions for a system state of the multiagent system are distributed according to a Boltzmann distribution depending on the quality measure determined for the robot.
 7. A robot controller configured to control a robot, the robot controller configured to: acquire sensor data representing an environment of the robot; identify one or more objects in the environment of the robot from the sensor data; associate the robot and each of the one or more objects with a respective agent of a multiagent system; determine, for each agent of the multiagent system, a quality measure which includes a reward term for a movement action at a position, and a coupling term which depends on probabilities of the other agents of the multiagent system occupying the same position as the respective agent at a time; determine a movement policy of the robot that selects movement actions with a higher value of the quality measure determined for the robot with higher probability than movement actions with a lower value of the quality measure; and control the robot according to the movement policy.
 8. A non-transitory computer-readable medium on which are stored instructions for controlling a robot, the instructions, when executed by a computer, causing the computer to perform the following steps: acquiring sensor data representing an environment of the robot; identifying one or more objects in the environment of the robot from the sensor data; associating the robot and each of the one or more objects with a respective agent of a multiagent system; determining, for each agent of the multiagent system, a quality measure which includes a reward term for a movement action at a position, and a coupling term which depends on probabilities of the other agents of the multiagent system occupying the same position as the respective agent at a time; determining a movement policy of the robot that selects movement actions with a higher value of the quality measure determined for the robot with higher probability than movement actions with a lower value of the quality measure; and controlling the robot according to the movement policy. 